package com.ruoyi.invoice.domain;

import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * 开票商品对象 invoice_products
 * 
 * @author ruoyi
 * @date 2025-03-04
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@TableName("invoice_products")
public class InvoiceProducts extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    @TableId(type = IdType.AUTO)
    private Long id;

    private Long salesInvoiceId;

    /** 商品名称 */
    @NotBlank(message = "商品名称不能为空")
    private String productName;

    /** 规格型号 */
    @NotBlank(message = "规格型号不能为空")
    private String specificationModel;

    /** 单位 */
    @NotBlank(message = "单位不能为空")
    private String unit;


    private Integer quantity;

    /** 税率 */
    @NotNull(message = "税率不能为空")
    private BigDecimal taxRate;

    /** 单价 */
    @NotNull(message = "单价不能为空")
    private BigDecimal unitPrice;

    /** 税额 */
    private BigDecimal productRate;

    /** 金额 */
    private BigDecimal productAmound;

    /** 税收分类码 */
    @NotBlank(message = "税收分类码不能为空")
    private String taxCategoryCode;

    /** 征税项目ID */
    @NotNull(message = "征税项目ID不能为空")
    private Long taxProjectId;

    /** 计税方法ID */
    @NotNull(message = "计税方法ID不能为空")
    private Long taxMethodId;

    @TableField(exist = false)
    private String projectName;

    @TableField(exist = false)
    private String methodName;

}
